package cn.drh.charging.order.feign;


import cn.drh.charging.common.pojo.JsonResult;
import cn.drh.charging.common.pojo.param.GunStatusUpdateParam;
import cn.drh.charging.common.pojo.vo.StationInfoVO;
import cn.drh.charging.common.pojo.vo.UserInfoVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @ClassName UserClient
 * @Description TODO
 * @Author renhong~Deng
 * @Date 2025/5/27 11:12
 * @Version 1.0
 *
 * 订单用来访问用户服务的客户端
 */

//userService 要和nacos中配置的serviceName一致
@FeignClient(value = "deviceService")
public interface DeviceClient {
    /**
     * 获取场站信息
     * @param gunId 用户id
     * @return 场站信息
     */
    @GetMapping("/device/station/info/{gunId}")
    JsonResult<StationInfoVO> getStationInfo(@PathVariable Integer gunId);

    @PostMapping("/device/station/gun/status/update")
    JsonResult<Boolean> update(@RequestBody GunStatusUpdateParam gunStatusUpdateParam);

}
